package apj.demo.service.impl;

import java.sql.SQLException;
import java.util.List;

import apj.demo.factory.DaoFactory;
import apj.demo.model.Income;
import apj.demo.service.IncomeServiceDao;
/*账单操作类*/
public class IncomeServiceDaoImpl implements IncomeServiceDao {

	/*获取单个页面数据*/
	public List<Income> pageData(int index) throws SQLException {
		return DaoFactory.getIncomeDaoImpl().pageData(index);
	}

	/*根据ID获取账单数据*/
	public Income findById(int id) throws SQLException {
		return DaoFactory.getIncomeDaoImpl().findById(id);
	}

	/*保存账单*/
	public void save(Income income) throws SQLException {
		DaoFactory.getIncomeDaoImpl().save(income);
	}

	/*更新账单数据*/
	public void update(Income income) throws SQLException {
		DaoFactory.getIncomeDaoImpl().update(income);
	}

	/*获取所有账单数据*/
	public List<Income> findByAll() throws SQLException {
		return DaoFactory.getIncomeDaoImpl().findByAll();
	}

}
